<!DOCTYPE html>
<html >
	<head>
		<meta charset="utf-8" />
		<script type="text/javascript" src="../js/angular.js" ></script>
		<title></title>
	</head>
	<style>
		.red{
			background-color: red;
		}
	</style>
	<body ng-app="app" >
		<div ng-controller="ctrl" >
			<span ng-class="{red:true}" >你好！</span>

			<table border="1">
				<tr>
					<td>Name</td>
					<td>Url</td>
				</tr>
				<tr ng-repeat="v in data" ng-class="{red:v.statu==0}" >
					<td>{{v.name}}</td>
					<td>{{v.url}}</td>
				</tr>
			</table>
		</div>
		<script>
			var app=angular.module("app",[]);
			app.controller("ctrl",["$scope",function($scope){
                $scope.data=[{name:"张三",url:"http://baidu.com",statu:0},{name:"李四",url:"http://163.com",statu:1},{name:"王五",url:"http://163.com",statu:0}];
			}]);
			
		</script>
	</body>
</html>
